package designpattern.observer.p2;

public class Main {
    public static void main(String[] args) throws InterruptedException {
        Calculator calculator = new Calculator();
        calculator.addProgressListener(new ProgressListener() {
            @Override
            public void stepPerformed(int step) {
                System.out.println("Step: " + step);
            }

            @Override
            public void completed() {
                System.out.println("Completed");
            }
        });
        calculator.calc();
    }

}
